import Vue from 'vue'
import vuex from 'vuex'

Vue.use(vuex)

export default new vuex.Store({
  state: {
    cityname: '北京',
    detailStr: '',
    footer: true,
    showOverlay: false,
    videoSRC: {},
    cinemaData: {}
  },
  mutations: {
    changeCity(state, city) {
      state.cityname = city
    },
    changeDetailStr(state, data) {
      state.detailStr = data
    },
    changeFooter(state, data) {
      state.footer = data
    },
    changeOverlay(state, data) {
      state.showOverlay = data
    },
    changeVideoSRC(state, data) {
      state.videoSRC = data
    },
    changeCinemaData(state, data) {
      state.cinemaData = data
    },
    change(state, data) {
      state[data.name] = data.data
    }
  }
})

